import { request } from '@/api/service'

export default {
  getAnnounceList (params) {
    return request({
      url: '/api/announcement/page',
      method: 'get',
      params
    })
  },
  addAnnouncement (data) {
    return request({
      url: '/api/announcement/add',
      method: 'post',
      data
    })
  },
  updateAnnouncement (data) {
    return request({
      url: '/api/announcement/edit',
      method: 'post',
      data
    })
  },
  deleteAnnouncement (id) {
    return request({
      url: '/api/announcement/delete',
      method: 'post',
      data: {
        id
      }
    })
  }
}
